package day12;

public class SleepThread extends Thread{
	
	long sleeptime;
	
	public SleepThread(long sleeptime) {
		this.sleeptime = sleeptime;
	}
	
	@Override
	public void run() {
		System.out.println("Sleeping " + getName());
		
		try {
			
			Thread.sleep(sleeptime);
			System.out.println("Stopping " + getName());
			
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
}
